<?php
/**
 * Created by IntelliJ IDEA.
 * User: 张伯发
 * Date: 2019/8/2
 * Time: 14:33
 */

namespace App\Common\Util;


class ArrayUtil
{
    public static function get(array $arr, string $key, string $default = '')
    {
        if (empty($arr))   return $default;

        if (false == isset($arr[$key])) return $default;

        return $arr[$key];
    }

}
